{# One memory module in the drawer: its editor, and what it renders into an agent's context right now. A fetcher's output is code, so only a static module's text is editable. #} {% from "components/macros/layout.html" import card, dialog_title %} {% from "components/macros/form.html" import checkbox, field, text_input, textarea, primary_button %}
{{ dialog_title(module.name, facts=module.slug) }} {% call card("Preview", "what an agent is handed", id="ai-module-preview") %} {% if preview %}
{{ preview }}
{% else %}

Renders nothing right now.

{% endif %} {% endcall %}
{% call field("Name") %}{{ text_input("name", module.name, required=True) }}{% endcall %} {% call field("Description") %}{{ text_input("description", module.description) }}{% endcall %}
{% call field("Category") %}{{ text_input("category", module.category) }}{% endcall %} {% call field("Priority") %}{{ text_input("priority", module.priority) }}{% endcall %} {% call field("Token estimate") %}{{ text_input("token_estimate", module.token_estimate) }}{% endcall %}
{% if module.fetch_function %}

Content from {{ module.fetch_function }}, a registered fetcher.

{% else %} {% call field("Content") %}{{ textarea("prompt_content", module.prompt_content or "", rows=8) }}{% endcall %} {% endif %} {{ checkbox("is_active", module.is_active, "Active") }} {{ primary_button("Save", type="submit") }}